#include <iostream>
#include <conio.h>
using namespace std;
int main()
{
int A;
int i=2;
cout<<"Vvedite A\n";
cin>>A;
float sum = 1;
while(sum<A)
{
sum=sum+1/(i*1.0);
if(sum>=A)
 {
  sum=sum-1/(i*1.0);
  break;
 }
i++;
}
cout<<"Naibolchee N = "<<i<<"\n";
cout<<"Sum = "<<sum;


        getch();
        return 0;
}
